Package MusicLandscape.entities
Class TVShow
- java.lang.Object
-
- MusicLandscape.entities.Event
-
- MusicLandscape.entities.TVShow
-
public class TVShow extends Event
represents the appearance of an artist in (a certain edition of) a TVShow as a specific event. e.g. "Johnny Cash" on "The Tonight Show".- Since:
- ExerciseSheet03
- Version:
- 1
- Author:
- Jonas Altrock (ew20b126@technikum-wien.at)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()gets the name of this TVShowintgetViewers()gets the number of viewers of this TVShowintimpact()returns the impact of this eventvoidsetName(java.lang.String name)sets the name of this TVShowvoidsetViewers(int v)sets the viewers of this TVshowjava.lang.StringtoString()returns a String representation of this TV-
Methods inherited from class MusicLandscape.entities.Event
getArtist, getAttendees, getDate, getDescription, getVenue, setArtist, setAttendees, setDate, setDescription, setVenue
-
-
-
-
Constructor Detail
-
TVShow
public TVShow()
creates a default TVShowa default TVShow is a default event with an unknown name and an unknown number of viewers.
-
TVShow
public TVShow(Event e)
creates a TV show from an eventthis constructor performs some kind of promotion such that it takes a generic event and creates a TV show which is a (deep) copy of the original event. The resulting TV show has unknown name and unknown viewers.
- Parameters:
e- - the event to copy/promote to TV show
-
TVShow
public TVShow(TVShow tvs)
creates a deep copy of a TVShow- Parameters:
tvs- - the TV show to copy
-
-
Method Detail
-
getViewers
public int getViewers()
gets the number of viewers of this TVShow- Returns:
- the viewers
-
setViewers
public void setViewers(int v)
sets the viewers of this TVshowillegal arguments are ignored
- Parameters:
v- - the number of viewers to set
-
getName
public java.lang.String getName()
gets the name of this TVShow- Returns:
- the name
-
setName
public void setName(java.lang.String name)
sets the name of this TVShowillegal arguments are ignored
- Parameters:
name- - the name to set
-
toString
public java.lang.String toString()
returns a String representation of this TVshow the string representation of a TV show is (without quotes):
"artist name" @ "show name" on "date" "description" ("audience" attending ("impact"))audience are all viewers and attendees of a show
-
impact
public int impact()
returns the impact of this eventthe impact is an estimation of the number of people who took notice of this event for a TV show event, the impact is the audience times 2. audience are all viewers and attendees of a show
-
-